package ch.fusun.baron.basic.client.ui.player;

import java.util.Map.Entry;

import org.eclipse.swt.graphics.Image;

import ch.fusun.baron.player.Player;

public enum ProposalColumn implements ColumnProvider<Entry<Player, Player>> {

	/**
	 * The proposer's name
	 */
	PROPOSER_NAME("Proposer", 100) {
		@Override
		public String getText(Entry<Player, Player> element) {
			return element.getKey().getName() + " ("
					+ element.getKey().getAge() + ")";
		}
	},
	/**
	 * Proposed to name
	 */
	PROPOSED_TO("Proposed To", 100) {

		@Override
		public String getText(Entry<Player, Player> element) {
			return element.getValue().getName() + " ("
					+ element.getValue().getAge() + ")";
		}

	};
	private String title;
	private int bounds;

	private ProposalColumn(String title, int bounds) {
		this.title = title;
		this.bounds = bounds;
	}

	@Override
	public String getTitle() {
		return this.title;
	}

	@Override
	public int getBounds() {
		return this.bounds;
	}

	@Override
	public Image getImage(Entry<Player, Player> element) {
		return null;
	}

	@Override
	public abstract String getText(Entry<Player, Player> element);
}
